package com.piz.model.common;

public enum ItemTastesEnum {
	
	 SPICY(1, "spicy"), SALTY(2, "salty"), CHEF(3, "shef");
	
	 
	 private long tasteId; 

	private String tasteName;
	
	ItemTastesEnum(int tasteId, String tasteName)
	  {
	    this.tasteId = tasteId;
	    this.tasteName = tasteName;
	  }

	// the valueOfMethod
	  public static ItemTastesEnum valueOf(int value) throws Exception
	  {
	    switch (value)
	    {
	      case 1 :
	        return SPICY;
	      case 2 :
	        return SALTY;
	      case 3 :
	        return CHEF;
	    }
	    throw new Exception("Could not find Taste for Id:" + value);
	  }
	  // the identifierMethod
	  public long getId()
	  {
	    return tasteId;
	  }

	  public String getName()
	  {
	    return this.tasteName;
	  }


}
